package com.gzwh.v1.sysapi.server.member.impl;

import com.gzwh.v1.sysapi.dao.member.MemberMapper;
import com.gzwh.v1.sysapi.entity.UserBean;
import com.gzwh.v1.sysapi.entity.member.SFMemberEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

@Service
public class MemberServerImpl {

    @Autowired
    MemberMapper memberMapper;

    public UserBean getByUsername(String username){
        return memberMapper.selectByUsername(username);
    }

    public void insert(UserBean userBean){
//        memberMapper.insert(userBean);
    }

    public Integer getCount(Example example){
        return memberMapper.selectCountByExample(example);
    }
    public UserBean findByUsername(String username) {
        return memberMapper.selectByUsername(username);
    }


    public void insertSFMember(SFMemberEntity sfMemberEntity){
        memberMapper.insert(sfMemberEntity);
    }


    public SFMemberEntity getSFMemberByName(String name){
        return memberMapper.selectSFMemberByName(name);
    }

}
